import requests

from basic.base_requests import UserRequests


class URL:
    FRONT_PRODUCT_LIST = "/api/front/product/list"
    FRONT_PRODUCT_REPLY_LIST = "/api/front/product/reply/list"


class FrontProduct(UserRequests,URL):

    def front_product_list(self):
        """
        选中商品列表
        """
        params = {
            'page': '1',
            'limit': '10',
            'brandId': '',
            'cid': '3',
            'keyword': '',
            'maxPrice': '',
            'merId': '',
            'minPrice': '',
            'priceOrder': '',
            'salesOrder': '',
            'tagId': '',
        }

        response = self.get(self.front_product_list.__name__,url=self.FRONT_PRODUCT_LIST,params=params,)
        return response

    def front_product_reply_list(self):
        """
        商品展示列表
        """

        params = {
            'page': '1',
            'limit': '10',
            'type': '0',
        }

        response = self.get(self.front_product_list.__name__,url=self.FRONT_PRODUCT_REPLY_LIST,params=params)
        return response


if __name__ == '__main__':
    front_product = FrontProduct()
    # front_product.front_product_list()
    front_product.front_product_reply_list()
